package com.kamistoat.meimeimall.meimeimallpayment.dao;

import com.kamistoat.meimeimall.common.annotation.AutoFillCreateTime;
import com.kamistoat.meimeimall.meimeimallpayment.entity.ReconciliationErrorEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ReconciliationErrorDao {
    /**
     * 向指定表添加数据
     */
    Long insertWithName(@Param("errorEntity") ReconciliationErrorEntity errorEntity, @Param("tableName") String tableName);

    /**
     * 创建指定名称的表
     *
     * @param tableName
     */
    void createTableWithName(@Param("tableName") String tableName);

    /**
     * 统计表内错误记录数
     */
    Long count(@Param("tableName") String tableName);

    /**
     * 丢弃指定表
     */
    void dropTableWithName(@Param("tableName") String tableName);

    /**
     * 分页获取
     */
    List<ReconciliationErrorEntity> selectAllInPage(@Param("tableName") String errTableName,
                                                    @Param("limit") Integer pageSize,
                                                    @Param("offset") Integer offset);
}
